#ifndef CPOINTERPEAKDATA_H
#define CPOINTERPEAKDATA_H
//
#include <qwt_math.h>
#include <qwt_array.h>
#include <qwt_double_interval.h>
#include <qwt_double_rect.h>

//
class CPointerPeakData
{
public:
	CPointerPeakData(const double *, const QwtDoubleInterval *, size_t);
	explicit CPointerPeakData():d_intervals(0),d_values(0),d_size(0){};

//	void setData(const double *, const QwtDoubleInterval *, size_t);

	size_t size() const;
	const QwtDoubleInterval & interval(size_t i) const;
	double value(size_t i) const;

	QwtDoubleRect boundingRect() const;
	
	const double * xData() const;
	const QwtDoubleInterval * yData() const;

private:
	const QwtDoubleInterval * d_intervals;
	const double * d_values;
	size_t d_size;
};

inline size_t CPointerPeakData::size() const
{
	return d_size;
}

inline const QwtDoubleInterval & CPointerPeakData::interval(size_t i) const
{
	return d_intervals[i];
}

inline double CPointerPeakData::value(size_t i) const
{
	return d_values[i];
}

inline const double * CPointerPeakData::xData() const
{
	return d_values;
}

inline const QwtDoubleInterval * CPointerPeakData::yData() const
{
	return d_intervals;
}

#endif
